<template>
    <!-- 内容 -->
    <router-view></router-view>
    <!-- 底部 -->
    <div id="footer">
        <ul>
            <li v-for="(item,index) in list" :key="item.path" @click="handleclick(index,item.path)">
                <img :src="item.url" alt="" srcset="">
                <span>{{item.title}}</span>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
  data() {
    return {
        list:[
            {
                title:'首页',
                path:'/index/home',
                url:require('.././assets/logo/home.png')
            },
            {
                title:'连接',
                path:'/index/connect',
                url:require('.././assets/logo/connect.png')
            },
             {
                title:'服务',
                path:'/index/service',
                url:require('.././assets/logo/service.png')
            },
            {
                title:'商城',
                path:'/index/shop',
                url:require('.././assets/logo/shop.png')
            },
            {
                title:'我家',
                path:'/index/mine',
                url:require('.././assets/logo/mine.png')
            },
            
        ]
    };
  },
  methods: {
      handleclick(i,j){
          console.log(i);
          this.$router.push(j)

      }
  },
};
</script>
<style lang="scss" scoped>
    ul{
        width: 100%;
        height: 60px;
        position: fixed;
        left: 0;
        bottom: 0;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        background-color: white;
        li{
            width: 40px;
            height: 100%;
            list-style: none;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            align-items: center;
            img{
                width: 100%;
                height: 40px;
            }
            span{
                 font-size: 14px;
            }
        }
    }
</style>
